package com.chixing.day03.day03_Test;

public class ArrayNumber {
    public static void main(String[] args) {
        int sum = 564;
        int rub = 10;
        for (int i = sum; i > 0; i--) {
            int temp = i;
            int tempSum = 0;
            while (temp > 0) {
                tempSum += temp;
                temp /= rub;
            }
            if (tempSum == sum)
                System.out.println(i);
        }
    }
}
